package com.wxapp.admin.service.controller;

import com.wxapp.admin.api.pojo.vm.userCDJ.PDeptSelectVm;
import com.wxapp.admin.api.pojo.vo.userCDJ.QDeptSelectVm;
import com.wxapp.admin.service.service.CompanyDeptService;
import com.wxapp.common.constant.base.IBaseController;
import com.wxapp.common.constant.pojo.vm.ResultVm;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author lgl
 * @Description 公司部门
 * @Datetime 2022/11/18 16:03
 * @Modified By
 */
@RestController
@RequestMapping("company/dept")
@Tag(name = "部门管理")
@RequiredArgsConstructor
public class CompanyDeptController extends IBaseController {

    private final CompanyDeptService companyDeptService;

    @PostMapping("/select/dept")
    @Operation(summary ="得到所有部门的下拉列表")
    public ResultVm<List<PDeptSelectVm>> selectDept(@RequestBody QDeptSelectVm vm) {
        return companyDeptService.selectDept(vm);
    }
}
